$(function() {
	//初始化a标签链接到tab
	$(".menu a").tab();
	$('#nav_container .navigation .menu li:first a').trigger("click");

	let isUnfold = true;
	$('#nav_container .navigation .logo .toggle').click(function() {
		isUnfold = !isUnfold;
		if (isUnfold) {
			$(this).attr('src', 'img/navigation/Arrows-send-left@2x.png');
		} else {
			$(this).attr('src', 'img/navigation/Arrows-send-right@2x.png')
		}
		$('#nav_container').toggleClass('nav_packUp')
	})
	
	console.log(localStorage.getItem('user_id'),localStorage.getItem('auth_str'))
	navShow()
})


function navShow(){
	let auth_str = localStorage.getItem('auth_str').split(',')
	if(auth_str.indexOf('4') == -1){
		$('#nav_container .navigation .menu li').eq(1).hide()
	}
	if(auth_str.indexOf('2') == -1){
		$('#nav_container .navigation .menu li').eq(2).hide()
	}
	if(auth_str.indexOf('3') == -1){
		$('#nav_container .navigation .menu li').eq(3).hide()
	}
}

